<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>游戏列表</title>
    <link href="${pageContext.request.contextPath }/statics/bootstrap.min.css" rel="stylesheet">
    <script type="javascript" src="${pageContext.request.contextPath }/statics/bootstrap.min.js"></script>
    <script type="javascript" src="${pageContext.request.contextPath }/statics/jquery-1.12.4.js"></script>
    <style>
        table tr th,td{
            text-align: center;
        }
        #right{
            text-align: right;
        }
    </style>
</head>
<body>
<div class="container">
    <c:if test="${empty gamelist}"><span>没有查询到您要找的游戏</span></c:if>
    <c:if test="${empty error}"><span>${error}</span></c:if>
    <table class="table table-striped" border="1">
        <tr><td id="right" colspan="4"><a href="javascript:history.back(-1)">返回</a></td></tr>
        <tr><td colspan="4">游戏列表</td></tr>
        <tr>
            <th>游戏名称</th><th>游戏类别</th><th>发行公司</th><th>发行年份</th>
        </tr>
        <c:forEach var="game" items="${gamelist}">
            <tr>
                <td>${game.gameName}</td>
                <td>${game.gameType}</td>
                <td>${game.gameCompany}</td>
                <td>${game.gameYear}</td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
